Response Structure
The POST /api_scan/v14 endpoint returns a JSON object. In the event of an unexpected error, only the error field will be returned. All other fields are optional and will be present only when the corresponding data was successfully extracted from the receipt image.
A SHA-256 HMAC hash of the raw JSON response is returned in the X-BlinkReceipt-Hash response header (keyed with your client secret), which you can use to verify the integrity of the response.
Top-Level Fields
Session & Identity
| Field | Type | Description |
|---|---|---|
error | string | Present only on unexpected errors. Contains the error message. |
blink_receipt_id | string | Unique identifier for this scan session. When scanning multiple frames across separate requests, capture this value from the first response and pass it in all subsequent requests. Example: "0d527efb-c97f-4678-a0dd-a9f89922b121" |
Transaction Metadata
| Field | Type | Format / Example | Description |
|---|---|---|---|
date | object | { "confidence": 99, "value": "01/01/2019" } | Purchase date in mm/dd/yyyy format |
time | object | { "confidence": 99, "value": "15:30" } | Purchase time in 24-hour hh:mm format |
time_seconds | object | { "confidence": 99, "value": "05" } | Seconds component of the purchase time, if detected |
subtotal | object | { "confidence": 99, "value": 95.15 } | Receipt subtotal |
total | object | { "confidence": 99, "value": 102.37 } | Receipt total |
taxes | object | { "confidence": 99, "value": 7.22 } | Tax amount |
cashier | object | { "confidence": 99, "value": "52" } | Cashier identifier |
register | object | { "confidence": 99, "value": "3" } | Register identifier |
transaction | object | { "confidence": 99, "value": "1234" } | Transaction identifier |
long_transaction | object | { "confidence": 99, "value": "ABCDEFGH12345678" } | Long transaction identifier (Poland only) |
store | object | { "confidence": 99, "value": "1001" } | Store identifier |
tax_id | object | { "confidence": 99, "value": "98765432" } | Tax identifier for this retailer (non-US) |
last4cc | object | { "confidence": 99, "value": "1234" } | Last 4 digits of the credit card used, if any |
cashback | number | 20 | Cashback amount, if any |
purchase_type | string | "In-Store" | Purchase type (e.g. In-Store, Dine-In) |
barcode | string | "350606291014501186" | Barcode detected on the receipt, if any |
Merchant Information
| Field | Type | Format / Example | Description |
|---|---|---|---|
merchant_name | string | "Walmart" | The name of the merchant |
merchant_confidence | number | 99 | Confidence score for merchant_name (0–100) |
store_street | object | { "confidence": 99, "value": "123 Main St" } | Street address of the store |
store_city | object | { "confidence": 99, "value": "Albuquerque" } | City of the store |
store_state | object | { "confidence": 99, "value": "NM" } | State of the store |
store_zip | object | { "confidence": 99, "value": "12345" } | ZIP code of the store |
purchase_country | string | "FR" | Detected 2-character ISO country code |
channel | object | { "confidence": 99, "value": "Food" } | Retail channel |
Quality & Classification
| Field | Type | Description |
|---|---|---|
is_receipt | boolean | Whether the submitted image(s) appear to be a valid receipt |
is_blurry | boolean | Whether the image(s) are too blurry to extract data |
is_screen | boolean | Whether the image(s) appear to be a photo of a screen rather than a physical receipt |
ocr_confidence | number | Average OCR confidence for characters on this receipt (e.g. 95.0) |
trip_confidence | number | Confidence score for trip-level (header) fields (e.g. 95) |
item_confidence | number | Confidence score for item-level (line item) fields (e.g. 100) |
Loyalty & Membership
| Field | Type | Description |
|---|---|---|
loyalty_program | boolean | Whether the receipt shows evidence of the shopper belonging to the retailer's loyalty program |
member_number | string | The consumer's membership number with this retailer, if detected |
Raw OCR Data
| Field | Type | Description |
|---|---|---|
raw_text | string | Raw OCR text for a single-frame scan |
raw_text_array | array of string | Array of raw OCR text, one element per image frame, for multi-URL scans |
Duplicate Detection
These fields are only present when detect_duplicates: true is passed in the request.
| Field | Type | Description |
|---|---|---|
isDuplicate | boolean | Whether the submitted receipt is a duplicate of a previously submitted receipt |
isFraudulent | boolean | Whether the submitted receipt is believed to be fraudulent |
duplicateBlinkReceiptIds | array of string | If isDuplicate is true, the blink_receipt_id values of the matching prior receipts |
products Array
The products field is an array of line-item objects representing each product detected on the receipt.
{
"products": [
{
"rpn": { "confidence": 99, "value": "1010101010" },
"rsd": { "confidence": 99, "value": "BANANAS", "original_case_value": "Bananas" },
"qty": { "confidence": 99, "value": 1.55 },
"price": { "confidence": 99, "value": 0.99 },
"fullPrice": { "confidence": 99, "value": 1.25 },
"totalPrice": { "confidence": 99, "value": 1.53 },
"uom": { "confidence": 99, "value": "pounds" },
"brand": "Kraft",
"category": "Microwaveable Meals",
"image_url": "https://www.domain.com/image.png",
"product_name": "Kraft Macaroni & Cheese",
"size": "5 oz",
"upc": "012345678901",
"item_type": "retail_product",
"line": 10
}
]
}
OCR-Extracted Fields
| Field | Type | Format / Example | Description |
|---|---|---|---|
rpn | object | { "confidence": 99, "value": "1010101010" } | Receipt Product Number — the SKU/product number as printed on the receipt |
rsd | object | { "confidence": 99, "value": "BANANAS", "original_case_value": "Bananas" } | Receipt Short Description. value is uppercased; original_case_value preserves original casing |
qty | object | { "confidence": 99, "value": 1.55 } | Quantity of this item. May represent weight when combined with uom |
price | object | { "confidence": 99, "value": 0.99 } | Actual unit price paid |
fullPrice | object | { "confidence": 99, "value": 1.25 } | Full item price before any coupons or discounts were applied |
totalPrice | object | { "confidence": 99, "value": 1.53 } | Total price paid for this line item (price × qty) |
uom | object | { "confidence": 99, "value": "pounds" } | Unit of measurement (e.g. "pounds", "ounces") |
Product Intelligence Fields
These fields are populated by the BlinkReceipt Product Intelligence service and do not include a confidence score.
| Field | Type | Description |
|---|---|---|
brand | string | Brand of the product (e.g. "Kraft") |
category | string | Product category (e.g. "Microwaveable Meals") |
image_url | string | URL of the product image |
product_name | string | Full product name (e.g. "Kraft Macaroni & Cheese") |
size | string | Product size (e.g. "5 oz") |
upc | string | Universal Product Code (e.g. "012345678901") |
item_type | string | Classification of the item type (e.g. "retail_product") |
fuel_type | string | For fuel receipts, the type of fuel purchased (e.g. "DIESEL") |
Prefix / Postfix Fields
Some merchants prepend or append characters to product numbers and descriptions on their receipts. These fields expose those affixes so you can reconstruct or strip them.
| Field | Type | Description |
|---|---|---|
rsd_prefix | string | Prefix the merchant prepends to RSDs |
rsd_postfix | string | Postfix the merchant appends to RSDs |
rpn_prefix | string | Prefix the merchant prepends to RPNs |
rpn_postfix | string | Postfix the merchant appends to RPNs |
Other Product Fields
| Field | Type | Description |
|---|---|---|
line | integer | Internal line number for this product within the receipt |
attributes | array of objects | Additional attributes for this item. Each element is an object with a single key-value pair specific to the attribute. |
infoLines (within each product)
Any additional text lines on the receipt that were associated with this product (e.g. member pricing notices).
| Field | Type | Format / Example | Description |
|---|---|---|---|
line | integer | 10 | Line number of the associated text |
text | object | { "confidence": 99, "value": "Member Price" } | The associated text content |
subProducts (within each product)
Some receipt formats nest sub-items under a parent product (e.g. bundled items). Each sub-product has the following fields:
| Field | Type | Format / Example | Description |
|---|---|---|---|
rpn | object | { "confidence": 99, "value": "1234" } | Receipt Product Number of the sub-item |
rsd | object | { "confidence": 99, "value": "ITEM NAME" } | Receipt Short Description of the sub-item |
qty | object | { "confidence": 99, "value": 1 } | Quantity of the sub-item |
price | object | { "confidence": 99, "value": 0.99 } | Unit price of the sub-item |
totalPrice | object | { "confidence": 99, "value": 0.99 } | Total price of the sub-item |
line | integer | 11 | Internal line number for the sub-item |
possible_products (within each product)
When Product Intelligence cannot narrow the scanned item to a single product, it returns a ranked list of candidates.
| Field | Type | Description |
|---|---|---|
brand | string | Candidate product brand |
category | string | Candidate product category |
image_url | string | Candidate product image URL |
product_name | string | Candidate product name |
size | string | Candidate product size |
upc | string | Candidate product UPC |
item_type | string | Candidate item type classification |
attributes | array of objects | Candidate product attributes |
probability | number | Probability (0–1) that this candidate matches the scanned item (e.g. 0.95) |
discounts Array
The discounts field is an array of coupon and discount objects detected on the receipt.
{
"discounts": [
{
"description": { "confidence": 99, "value": "Save 75%" },
"sku": { "confidence": 99, "value": "999" },
"price": { "confidence": 99, "value": 0.25 },
"relatedProductIndex": 2,
"line": 10
}
]
}
| Field | Type | Format / Example | Description |
|---|---|---|---|
description | object | { "confidence": 99, "value": "Save 75%" } | Human-readable description of the coupon or discount |
sku | object | { "confidence": 99, "value": "999" } | SKU associated with this coupon |
price | object | { "confidence": 99, "value": 0.25 } | Amount of the discount (positive value) |
desc_prefix | string | "*" | Prefix the merchant prepends to coupon descriptions |
desc_postfix | string | "*" | Postfix the merchant appends to coupon descriptions |
sku_prefix | string | "*" | Prefix the merchant prepends to coupon SKUs |
sku_postfix | string | "*" | Postfix the merchant appends to coupon SKUs |
relatedProductIndex | integer | 2 | Zero-based index of the associated product in the products array, if any |
line | integer | 10 | Internal line number for this discount |
phones Array
An array of phone numbers detected anywhere on the receipt.
{
"phones": [
{ "confidence": 99, "value": "123-456-7890" }
]
}
Each element is an object with confidence (number, 0–100) and value (string) containing the detected phone number.
paymentMethods Array
An array of payment method objects detected on the receipt. There may be multiple entries if the transaction was split across payment methods.
{
"paymentMethods": [
{
"method": { "confidence": 99, "value": "Credit Card" },
"cardType": { "confidence": 99, "value": "Mastercard" },
"cardIssuer": { "confidence": 99, "value": "Target" },
"amount": { "confidence": 99, "value": 102.37 }
}
]
}
| Field | Type | Format / Example | Description |
|---|---|---|---|
method | object | { "confidence": 99, "value": "Credit Card" } | Payment method label (e.g. "Cash", "Credit Card", "EBT") |
cardType | object | { "confidence": 99, "value": "Mastercard" } | Card network (e.g. "Visa", "Mastercard", "American Express") |
cardIssuer | object | { "confidence": 99, "value": "Target" } | For co-branded cards, the issuing institution (e.g. "Target", "Chase") |
amount | object | { "confidence": 99, "value": 102.37 } | Amount paid by this payment method |
qualifiedPromos Array
Present only when validate_promotions: true is passed in the request. Lists every promotion slug that the receipt qualified for.
{
"qualifiedPromos": [
{
"slug": "buy1get1",
"rewardValue": 1.99,
"rewardCurrency": "USD",
"relatedProductIndexes": [4, 7],
"qualifications": [[4], [7]],
"qualifiedProductLists": [
{
"productIndex": 4,
"productGroups": ["Group 1"]
}
]
}
]
}
| Field | Type | Description |
|---|---|---|
slug | string | The promotion slug that qualified |
rewardValue | number | Monetary value of the reward (e.g. 1.99) |
rewardCurrency | string | ISO currency code for the reward (e.g. "USD") |
relatedProductIndexes | array of number | Zero-based indexes of all products in the products array that caused this promo to qualify |
qualifications | array of array of number | When a promo qualifies multiple times on the same receipt, each element is an array of product indexes for one qualifying instance |
qualifiedProductLists | array of objects | Detailed per-product qualification data (see below) |
qualifiedProductLists entries
| Field | Type | Description |
|---|---|---|
productIndex | integer | Zero-based index of the qualifying product in the products array |
productGroups | array of string | The product groups this product qualified for within the promotion |
unqualifiedPromos Array
Present only when validate_promotions: true is passed. Lists every evaluated promotion slug that did not qualify, along with the reason.
{
"unqualifiedPromos": [
{
"slug": "buy1get1",
"errorCode": 1,
"errorMessage": "No Clorox products purchased"
}
]
}
| Field | Type | Description |
|---|---|---|
slug | string | The promotion slug that failed to qualify |
errorCode | number | Numeric error code identifying the reason for disqualification |
errorMessage | string | Human-readable explanation of why the promotion did not qualify |
Response Header
| Header | Type | Description |
|---|---|---|
X-BlinkReceipt-Hash | string | SHA-256 HMAC hash of the raw JSON response body, computed using your client secret as the key. Use this to verify response integrity. |
Example Response
The following is an abbreviated example showing the structure of a successful response:
{
"blink_receipt_id": "0d527efb-c97f-4678-a0dd-a9f89922b121",
"is_receipt": true,
"is_blurry": false,
"is_screen": false,
"ocr_confidence": 95.0,
"merchant_name": "Walmart",
"merchant_confidence": 99,
"date": { "confidence": 99, "value": "01/15/2024" },
"time": { "confidence": 99, "value": "14:22" },
"store_street": { "confidence": 99, "value": "123 Main St" },
"store_city": { "confidence": 99, "value": "Albuquerque" },
"store_state": { "confidence": 99, "value": "NM" },
"store_zip": { "confidence": 99, "value": "87101" },
"subtotal": { "confidence": 99, "value": 95.15 },
"taxes": { "confidence": 99, "value": 7.22 },
"total": { "confidence": 99, "value": 102.37 },
"trip_confidence": 95,
"item_confidence": 100,
"products": [
{
"rpn": { "confidence": 99, "value": "1234567" },
"rsd": { "confidence": 99, "value": "KRAFT MAC & CHEESE", "original_case_value": "Kraft Mac & Cheese" },
"qty": { "confidence": 99, "value": 2 },
"price": { "confidence": 99, "value": 1.99 },
"totalPrice": { "confidence": 99, "value": 3.98 },
"brand": "Kraft",
"category": "Microwaveable Meals",
"product_name": "Kraft Macaroni & Cheese",
"size": "7.25 oz",
"upc": "021000011896",
"item_type": "retail_product",
"line": 5
}
],
"discounts": [
{
"description": { "confidence": 99, "value": "MEMBER SAVINGS" },
"price": { "confidence": 99, "value": 0.50 },
"relatedProductIndex": 0,
"line": 6
}
],
"paymentMethods": [
{
"method": { "confidence": 99, "value": "Credit Card" },
"cardType": { "confidence": 99, "value": "Visa" },
"amount": { "confidence": 99, "value": 102.37 }
}
],
"loyalty_program": true,
"isDuplicate": false
}